package com.logictech.lims.entity;

import java.util.Date;
import java.math.BigDecimal;
import org.jeecgframework.p3.core.utils.persistence.Entity;

import com.logictech.common.util.data.DateUtils;
import com.logictech.common.util.data.StringUtils;

/**
 * 描述：</b>Glassware:<br>
 * 
 * @author guoqi
 * @since：2017年03月23日 13时02分39秒 星期四
 * @version:1.0
 */
public class Glassware implements Entity<Integer> {
	private static final long serialVersionUID = 1L;

	/**
	 * 玻璃仪器ID
	 */
	private Integer id;
	/**
	 * 编号
	 */
	private String no;
	/**
	 * 类型
	 */
	private Integer glasswareTypeId;
	/**
	 * 类型
	 */
	private String glasswareType;
	/**
	 * 状态
	 */
	private String status;
	
	/**
	 * 状态
	 */
	private String statusVal;
	/**
	 * 校验完成时间
	 */
	private Date checkTime;
	/**
	 * 报废时间
	 */
	private Date scrapTime;
	/**
	 * 报废原因
	 */
	private String scrapReason;
	/**
	 * 创建者Id
	 */
	private String createUser;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新者Id
	 */
	private String updateUser;
	/**
	 * 更新时间
	 */
	private Date updateTime;

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getNo() {
		return this.no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public Integer getGlasswareTypeId() {
		return this.glasswareTypeId;
	}

	public void setGlasswareTypeId(Integer glasswareTypeId) {
		this.glasswareTypeId = glasswareTypeId;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getCheckTime() {
		return this.checkTime;
	}

	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}

	public Date getScrapTime() {
		return this.scrapTime;
	}

	public void setScrapTime(Date scrapTime) {
		this.scrapTime = scrapTime;
	}

	public String getScrapReason() {
		return this.scrapReason;
	}

	public void setScrapReason(String scrapReason) {
		this.scrapReason = scrapReason;
	}

	public String getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdateUser() {
		return this.updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getGlasswareType() {
		return glasswareType;
	}

	public void setGlasswareType(String glasswareType) {
		this.glasswareType = glasswareType;
	}

	public String getStatusVal() {
		if("1".equals(status)){
			statusVal = "使用中";
		}else if("0".equals(status)){
			statusVal = "报废";
		}
		return statusVal;
	}

	public void setStatusVal(String statusVal) {
		this.statusVal = statusVal;
	}

	@Override
	public String toString() {
		return "[编号=" + no + ", 类型=" + glasswareType + ", 状态=" + getStatusVal() + ", 校验完成时间=" + 
				DateUtils.dateToString(checkTime,DateUtils.PATTEN_YMD) + ", 报废时间="
				+ StringUtils.nvl(DateUtils.dateToString(scrapTime,DateUtils.PATTEN_YMD)) + ", 报废原因=" + 
				StringUtils.nvl(scrapReason) + "]";
	}

}
